<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>iframe</title>

    <script>
        function go() {
            document.getElementById("iframe").src=document.getElementById("url").value;
        }
    </script>
</head>
<body>
<div>
    <p>请输入地址</p>
    <input type="text" id="url" value="https://ai.taobao.com/">
    <input type="submit" value="提交" onclick="go()">
</div>
<div>
    <iframe id="iframe" style="width: 100%;height: 500px">

    </iframe>
</div>
</body>
</html>